<?php include("../conn.php");
mysql_query('SET NAMES UTF8'); 
  
class MyPrizeBean{
	public $code;

	function __construct($code)
	{
		$this->code      = $code;
	}
}

	$prize = array();
	if($_GET['role'] == 0) {
		$table = 'user';
	} elseif($_GET['role'] == 1) {
		$table = 'shop';
	}
	
	$rert30 = mysql_query("select * from " . $table . " where  bindphone ='".$_REQUEST[phone]."'");
    $rowf = mysql_fetch_array($rert30);
    
   if($rowf != true) {
      $der = 200;
   }else{
	  $der = 100;
   }
   
$prize[] = new MyPrizeBean($der);
echo json_encode($prize);
?>